﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="modellabel_manage.aspx.cs"
    Inherits="admin_manager_modellabel_manage" validaterequest="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>静态页面发布</title>
    <link href="../css/default.css" rel="stylesheet" type="text/css" />

    <script src="../js/CheckBox.js" type="text/javascript"></script>

    <script language="javascript"> 
 function del(obj){
       if(!ischecked(obj)){
        alert("请选择要删除的用户！")
        return;
       }
            var flag=false;
            flag=confirm('此操作不能恢复,您确定删除吗?')
            return flag;
        }
        function ischecked(obj){
        var chechk=false;
          var frm= obj;
          for(var i=0;i<frm.elements.length;i++){
            var e=frm.elements[i];
            if(e.name!=="allbox"&&e.type=="checkbox"&&e.checked){
            chechk=true;
            }
           }
            return chechk;
        }
    </script>

</head>
<body>
    <form id="Form2" name="Form1" runat="server">
    <table width="100%" height="600" border="0" align="left" cellpadding="0" cellspacing="0"
        bgcolor="#FFFFFF"  id="_listpage" >
        <tr>
            <td height="414" align="left" valign="top" class="rightbg">
                <table width="100%" height="489" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td height="26">
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td height="2" bgcolor="#A49B81">
                                    </td>
                                </tr>
                                <tr>
                                    <td height="22" background="../images/position_bg.gif" bgcolor="#EEF6FE" class="subnav"
                                        style="background-repeat: repeat-y; background-position: left; padding-left: 6px;
                                        padding-top: 3px;">
                                     <asp:Label ID="header" runat="server" Text="Label"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td height="1" bgcolor="#B0C9E8">
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td height="16">
                        </td>
                    </tr>
                    <tr>
                        <td height="21">
                            <table border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td width="25">
                                        &nbsp;
                                    </td>
                                    <td width="100" align="left">
                                        <table width="80" border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                                <td width="3">
                                                    <img src="../images/btn_blue_left.gif" width="3" height="21" />
                                                </td>
                                                <td width="26" align="center" background="../images/btn_blue_center.jpg">
                                                    <img src="../images/icon_add.gif" width="16" height="14" />
                                                </td>
                                                <td align="left" background="../images/btn_blue_center.jpg" class="subnav">
                                                    <a href="modellabel_add.aspx?layerid=<%=Layerid%>">新 增</a>
                                                </td>
                                                <td width="3">
                                                    <img src="../images/btn_blue_right.jpg" width="3" height="21" />
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                    <td width="100" align="center">
                                        <table width="80" border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                                <td width="3">
                                                    <img src="../images/btn_blue_left.gif" width="3" height="21" />
                                                </td>
                                                <td width="26" align="center" background="../images/btn_blue_center.jpg">
                                                    <img src="../images/icon_delete.gif" width="15" height="15" />
                                                </td>
                                                <td align="left" background="../images/btn_blue_center.jpg" class="subnav">
                                                    <asp:LinkButton ID="btnDelete" runat="server" OnClientClick="return del(document.forms[0])" 
                                                        onclick="btnDelete_Click" >删 除</asp:LinkButton>
                                                </td>
                                                <td width="3">
                                                    <img src="../images/btn_blue_right.jpg" width="3" height="21" />
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                    
                                    <td width="100" align="center">
                                        <table width="80" border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                                <td width="3">
                                                    <img src="../images/btn_blue_left.gif" width="3" height="21" />
                                                </td>
                                                <td width="26" align="center" background="../images/btn_blue_center.jpg">
                                                    <img src="../images/icon_add.gif" width="15" height="15" />
                                                </td>
                                                <td align="left" background="../images/btn_blue_center.jpg" class="subnav">
                                                    <asp:LinkButton ID="html" runat="server" OnClientClick="return onhtml()" 
                                                        onclick="htmlDelete_Click" >HTML</asp:LinkButton>
                                                </td>
                                                <td width="3">
                                                    <img src="../images/btn_blue_right.jpg" width="3" height="21" />
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td height="16">
                        </td>
                    </tr>
                    <tr>
                        <td height="410" align="left" valign="top" style="padding-left: 10px;">
                            <table width="90%" height="156" border="1" align="center" cellpadding="0" cellspacing="0"
                                bordercolorlight="#2583BC" bordercolordark="#ffffff">
                                <tr>
                                    <td width="100%" height="154" align="center" valign="top">
                                        <asp:Repeater ID="Repeater1" runat="server" 
                                           >
                                            <ItemTemplate>
                                            <tr>
                                                <td align="center" height="22">                                                                                            
                                                    <asp:CheckBox ID="DeleteThis" runat="server" />
                                                </td>
                                                <td align="center" height="22">
                                                    <asp:Literal ID="Literal1"  Text='<%#Eval("LABEL_ID")%>' runat="server"></asp:Literal>
                                                </td>
                                                <td align="center" height="22">
                                                    <%#Eval("LABEL_NAME")%>
                                                </td>
                                                <td align="center" height="22">
                                                    <%#Eval("LABEL_DEF")%>
                                                </td>             
                                                <td align="center" height="22">
                                                    <%#Eval("IS_HTML").ToString()=="1"?"是":"否"%>
                                                </td>                                  
                                                <td align="center" height="22">
                                                    <%#Eval("LABEL_TYPE")%>
                                                </td>
                                                
                                                <td align="center" height="22">
                                                    <a href="modellabel_modify.aspx?id=<%#Eval("LABEL_ID") %>&layerid=<%=Layerid %>">修改</a>
                                                    
                                                    <a href='#' onclick="window.open('/include/tag/<%#Eval("HTML_FILE_NAME")%>','_html','width=625,height=235,resizable=1,scrollbars=auto');" <%#Eval("IS_HTML").ToString()=="1"?"":"style='display:none'" %>>HTML</a>
                                                </td>
                                                </tr>
                                            </ItemTemplate>
                                            <HeaderTemplate>
                                                <table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
                                                    <tr>
                                                        <th width="10%" height="25" align="center">
                                                            <b>
                                                               全选 <input name="allbox" id="allbox" type="checkbox" onclick="CA()" /></b>
                                                        </th>
                                                        <th width="5%" height="25" align="center">
                                                            <b>id</b>
                                                        </th>
                                                        <th width="15%" align="center">
                                                            <b>模板名称</b>
                                                        </th>
                                                        <th width="15%" align="center">
                                                            <b>模板定义</b>
                                                        </th>                                                        
                                                        <th width="15%" align="center">
                                                            <b>是否生成HTML</b>
                                                        </th>
                                                        <th width="10%" align="center">
                                                            <b>类型</b>
                                                        </th>
                                                        <th width="10%" align="center">
                                                            <b>修改</b>
                                                        </th>
                                                    </tr>
                                            </HeaderTemplate>
                                            <FooterTemplate>
                                                </table></FooterTemplate>
                                        </asp:Repeater>
                                        <br />
                                        <br />
                                    </td>
                                </tr>
                            </table>
                            <br />
                </table>
            </td>
        </tr>
    </table>
    
    </form>
    <iframe id="wait2" name="wait2" style="display:none;" width=100% height="600" src="../images/wait.gif" FRAMEBORDER='0' align='middle' bgcolor='#FFFFFF'></iframe>
<script type="text/javascript">

    function onhtml() {
        document.all.wait2.style.display = "inline";
        document.all._listpage.style.display = "none";
        return true;
    }   
</script>
</body>
</html>
